(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/member/address/address" ], {
    "0580": function(t, e, n) {},
    "11f3": function(t, e, n) {
        n.r(e);
        var o = n("b295"), r = n.n(o);
        for (var i in o) "default" !== i && function(t) {
            n.d(e, t, function() {
                return o[t];
            });
        }(i);
        e.default = r.a;
    },
    "5b2b": function(t, e, n) {
        var o = n("0580");
        n.n(o).a;
    },
    "73ed": function(t, e, n) {
        n.r(e);
        var o = n("abc9"), r = n("11f3");
        for (var i in r) "default" !== i && function(t) {
            n.d(e, t, function() {
                return r[t];
            });
        }(i);
        n("5b2b");
        var a = n("f0c5"), c = Object(a.a)(r.default, o.b, o.c, !1, null, "769b06dd", null, !1, o.a, void 0);
        e.default = c.exports;
    },
    abc9: function(t, e, n) {
        n.d(e, "b", function() {
            return r;
        }), n.d(e, "c", function() {
            return i;
        }), n.d(e, "a", function() {
            return o;
        });
        var o = {
            empty: function() {
                return n.e("components/empty/empty").then(n.bind(null, "6234"));
            }
        }, r = function() {
            this.$createElement, this._self._c;
        }, i = [];
    },
    b295: function(t, e, n) {
        (function(t) {
            function o(t) {
                return function(t) {
                    if (Array.isArray(t)) return r(t);
                }(t) || function(t) {
                    if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) return Array.from(t);
                }(t) || function(t, e) {
                    if (t) {
                        if ("string" == typeof t) return r(t, e);
                        var n = Object.prototype.toString.call(t).slice(8, -1);
                        return "Object" === n && t.constructor && (n = t.constructor.name), "Map" === n || "Set" === n ? Array.from(t) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? r(t, e) : void 0;
                    }
                }(t) || function() {
                    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
                }();
            }
            function r(t, e) {
                (null == e || e > t.length) && (e = t.length);
                for (var n = 0, o = new Array(e); n < e; n++) o[n] = t[n];
                return o;
            }
            Object.defineProperty(e, "__esModule", {
                value: !0
            }), e.default = void 0;
            var i = {
                components: {
                    empty: function() {
                        n.e("components/empty/empty").then(function() {
                            return resolve(n("6234"));
                        }.bind(null, n)).catch(n.oe);
                    }
                },
                data: function() {
                    return {
                        dataSource: [],
						buttonTitle: "",
						tc:0,
                        addkey: "",
                        page: 1
                    };
                },
                onLoad: function(e) {
                    var n = (e || {}).type, o = void 0 === n ? "0" : n;
                    var tc = (e || {}).tc;
                    this.type = o;
                    this.tc = tc;
                    console.log('o',o);
                    var r = "";
                    1 == o ? (r = "寄件地址簿", this.buttonTitle = "添加寄件地址") : 2 == o && (r = "收件地址簿", this.buttonTitle = "添加收件地址"), 
                    t.setNavigationBarTitle({
                        title: r
                    });
                },
                onShow: function() {
                    this.loadRes();
                },
                onPullDownRefresh: function() {
                    this.loadRes();
                },
                onReachBottom: function() {
                    this.$db.get("userToken") && (this.page++, this.loadRes(!1));
                },
                methods: {
                    select: function(e) {
                        "0" !== this.type && (this.$db.get("sendAddr"), this.$db.get("receiptAddr"), this.$db.set("1" === this.type ? "sendAddr" : "receiptAddr", e), 
                        t.navigateBack());
                    },
                    loadRes: function() {
                        var t = this, e = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0];
                        e && (this.page = 1, this.dataSource = []), this.$api.getUserAreaListApi({
                            page: this.page,
                            limit: 5,
							type: this.type,
							tc: this.tc,
                            addkey: this.addkey
                        }, function(n) {
                            if ("1" == n.code) {
                                var r = n.data.list, i = void 0 === r ? [] : r;
                                t.dataSource = e ? o(i) : [].concat(o(t.dataSource), o(i)), t.page > 1 && 0 === i.length && (t.$common.errorToShow("已加载全部数据"), 
                                t.page--);
                            } else t.$common.errorToShow(n.msg);
                        });
                    },
                    edit: function(t) {
                        var e = "";
                        t && (e = "id=".concat(t.id));
						var n = this.type;
						var tc = this.tc;
                        this.$common.navigateTo("/pages/member/address-edit/address-edit?tc="+tc+"&mode=".concat(n, "&").concat(e));
                    },
                    remove: function(t) {
                        var e = this;
                        this.$common.modelShow("提示", "确认删除此地址吗?", function() {
                            e.$api.areaDelApi({
                                addr_id: t
                            }, function(t) {
                                "1" == t.code ? e.$common.successToShow(t.msg, function() {
                                    e.loadRes();
                                }) : e.$common.errorToShow(t.msg);
                            });
                        });
                    }
                }
            };
            e.default = i;
        }).call(this, n("543d").default);
    },
    dee7: function(t, e, n) {
        (function(t) {
            n("98af"), o(n("66fd"));
            var e = o(n("73ed"));
            function o(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = n, t(e.default);
        }).call(this, n("543d").createPage);
    }
}, [ [ "dee7", "common/runtime", "common/vendor" ] ] ]);